home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / svgabg55 / notestc.svg < prev    next >
Text File  |  1994-08-23  |  4KB  |  108 lines

  1. SuperVGA TrueColor (24-bit) BGI driver 
  2. Version 1.7
  3. August 23, 1994
  4.  
  5. Revisions:
  6.     1.7 - August 23, 1994
  7.     1.2 - July 20, 1994
  8.     1.1 - May 30, 1994
  9.     1.0 - April 30, 1994
  10.  
  11. This is the latest version of my SuperVGA TrueColor BGI driver.  All functions
  12. have been implemented, but there may still be bugs.  This driver will only
  13. work on a 386 or higher.
  14.  
  15. Note:  Palette functions, and the mouse cursor will not work with this driver.
  16. The mouse cursor will work if you have the HGXMOUSE TSR loaded.
  17.  
  18.   Using the HiColor driver:
  19.  
  20.     Implementing the TrueColor color driver involved several hacks, as
  21.     the BGI interface only supports 8-bit color values, but the driver
  22.     needed support for 24-bit color values.  The procedures that needed
  23.     to be changed were those that accepted color values, (SetColor,
  24.     SetFillStyle, SetFillPattern, PutPixel and Floodfill)  and those 
  25.     that return color values (GetColor and GetPixel).
  26.     As the TrueColor modes do not support palettes, I decided to use
  27.     the SetRgbPalette call to set colors, as it accepts values for the 
  28.     R,G and B components of the color.
  29.  
  30.     The format of a pixel in the TrueColor modes is:
  31.         -Byte 2- -Byte 1- -Byte 0-
  32.         RRRRRRRR GGGGGGGG BBBBBBBB
  33.  
  34.     Several new functions are defined to make the color selection easier.
  35.     In addition, the macro RGB(rv,gv,bv) has been defined.  It packs
  36.     the R, G and B values into the format described above and returns the
  37.     combined color.
  38.  
  39.     * RealDrawColor(); - Sets the current drawing color.
  40.       Usage:
  41.         setcolor(RealDrawColor(RGB(rval,gval,bval)); - HiColor modes
  42.         setcolor(RealDrawColor(cval)); - (suggested for any other driver)
  43.  
  44.     * RealFillColor(); - Sets the current fill color.
  45.       Usage:
  46.         setfillstyle(fillstyle,RealFillColor(RGB(rval,gval,bval)));
  47.         setfillstyle(fillstyle,RealFillColor(cval));
  48.         setfillpattern(fillpat,RealFillColor(RGB(rval,gval,bval)));
  49.         setfillpattern(fillpat,RealFillColor(cval));
  50.  
  51.     * RealColor(); - For putpixel, sets the color of the pixel
  52.                - For floodfill, sets the color of the boundary
  53.         putpixel(x,y,RealColor(RGB(rval,gval,bval)));
  54.         putpixel(x,y,RealColor(cval));
  55.         floodfill(x,y,RealColor(RGB(rval,gval,bval)));
  56.         floodfill(x,y,RealColor(cval));
  57.  
  58.     * RealDrawColor, RealFillColor, and RealColor all use a hacked 
  59.       interface to setrgbpalette.  If you would rather use the call
  60.       directly, the format is:
  61.  
  62.         RealDrawColor:
  63.         setrgbpalette(1024,Rval,Gval,Bval); 
  64.         RealFillColor:
  65.         setrgbpalette(1025,Rval,Gval,Bval);
  66.         RealColor:
  67.         setrgbpalette(1026,Rval,Gval,Bval);
  68.  
  69.       where Rval, Gval, Bval = 0..255.
  70.  
  71.     * GetPixel normally only returns an 8-bit value.  However, the
  72.       value returned from the BGI driver is a 32-bit value in EDX (the 
  73.       BGI kernel loads the value into AX and clears the upper 8 bits),
  74.       so to read the value of a pixel:
  75.  
  76.       In Pascal:
  77.         Color := getpixel(x,y);
  78.         inline($89/$56/<Color);  (* Loads 32-bit color value from EDX *)
  79.  
  80.       In C:
  81.         Color = getpixel(x,y);
  82.         Color = _EDX;
  83.       
  84.     * Paging information:
  85.  
  86.       Mode        Paging?        # of pages (with 1024k)
  87.       320x200    yes        4
  88.       640x350    yes        1
  89.       640x400    yes        1
  90.       640x480    no        1
  91.       800x600    no        N/A
  92.       1024x768    no        N/A
  93.       1280x1024    no        N/A
  94.  
  95.     * Works with: ATI, Cirrus, Everex, NCR, Oak-077, Primus 2000,
  96.       Paradise WD90c3x and VESA [v1.2+]
  97.  
  98.     o Drivers now have compile-time support for BGI version 3.0.
  99.       Supports protected mode with Borland Pascal 7.0 (1.0)
  100.  
  101.     o Fixed Chips & Technologies detect bug (1.1)
  102.  
  103.     o Integrated support for HGXMOUSE mouse cursor TSR. (1.2)
  104.  
  105.     o Fixed IIT AGX bankswitch bug (1.7)
  106.  
  107.     o Started 386 code optimization (1.7)
  108.